package com.itheima.mapper1;

import com.itheima.domain.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author wuyiqiang
 * @2022/6/19 19:47
 */
@Mapper
public interface OrderDetailMapper {

    /**
     * 提交订单详情
     *
     * @param orderDetailList
     */
    void save(@Param("orderDetailList") List<OrderDetail> orderDetailList);

    /**
     * 根据订单id查询订单详情
     * @param OrderId
     * @return
     */
    @Select("select * from order_detail where order_id=#{orderId}")
    List<OrderDetail> selectByOrderId(String OrderId);

}
